<div id="projects">
<% if projects_results.size > 0 %>
<hr />
<% for i in (0..projects_results.length-1) %>
<% prj = projects_results[i] %>
<div>
	<p class="font_description2">
	<strong><%= l(:label_tags_project_name) %><%= link_to "#{prj.name}",{:controller => "open_source_projects",:action => "show",:id => prj.id}, :onclick => "return user_trace_click_project_after_tag_search('#{request.session_options[:id]}','#{i+1}','#{prj.id}');" %></strong>
	<br />
	<strong><%= l(:label_tags_project_description) %></strong><%= prj.short_description %>
	</p>
</div>
<div class="line_under"></div>
<% end %>
<% end %>
</div>

<!-- ajax user trace zhangxunhui begin -->
<script type="text/javascript">
	function user_trace_click_project_after_tag_search(session_id,rank,osp_id){
		page = '<%=@obj_pages.page %>'
		tag_num = $('#selected_tags').find("li").length;
		keyword = new Array();
		for(i = 0; i < tag_num; i++){
			tag = $('#selected_tags').find("li").eq(i).text().trim();
			keyword[i] = tag;
		}
		keyword_encode = encodeURIComponent(keyword);
    	$.ajax({
			type: "post",
			contentType: "application/json; charset=utf-8",
			url: '/user_traces/click_project_after_tag_search?session_id=' + session_id + "&osp_id=" + osp_id + "&page=" + page + "&rank=" + rank + "&keyword=" + keyword_encode,
			dataType: "json"
		});
    }
</script>
<!-- ajax user trace zhangxunhui end -->